LoadRetainData block
Short summary
Name |
|
→POU type |
|
Category |
more system blocks, persistence blocks, block with internal error diagnostic |
Graphical interface |
|
Available since |
The block is supported for the platform |
Functionality
The block loads values from a CSV file for →retentive variables.
Restriction
|
Recommendation on usage Use the block only once in a →program and at the beginning of the application cycle (= init state). See example below. |
Inputs, outputs, return value
|
Identifier |
Description |
|
---|---|---|---|
Inputs: |
|
|
name of the file where the values of the variables are stored |
Outputs: |
|
|
number of variables that could not be loaded |
|
|
number of variables marked as |
|
|
|
return code:
|
|
Return value: |
– |
|
returns the return code of |
Input EN
and output ENO
are available when →calling the block. See "Execution control: EN, ENO" for information on input EN
and output ENO
.
See:
-
"Blocks for safe logic" whether this block is supported for developing safety-relevant applications.
-
"Highlighting safe logic in the FBD-editor" for the effects when using the block as a block for safe logic.
Internal error diagnostic for block
The block checks the following error cases:
-
The system service has not been loaded.
-
The return code of the function call equates to an error (output
RC
≠ value0
).
In such an error case, the output ENO
of the block is set to value FALSE
(or an equivalent).
Example for usage within ST-editor
The values of the variables that are declared in the section VAR RETAIN ... END_VAR
are loaded in the initial state (= init state) and saved in the term state by using the RTSCycleInfo
block.
Best to see the RTSCycleInfo block to find out at which moments the initial cycle and the term cycle respectively are executed.
|
When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.